/*
 * The util method to wrap the c lib functions.
 */
#ifndef UTIL_H
#define UTIL_H

#include "crossbit/common.h"
#include "memory.h"
#include "string.h"
#include "stdio.h"
#include "assert.h"
#include "stdlib.h"
#include <signal.h>

namespace crossbit{

    class UTIL{
        private :
            UTIL(){};
        public:
            static void XTLOG(const XTCPStr, ...);

            static  XTUint32 XTStrlen( XTCPStr str);

            static void XTStrcpy( XTPStr to , XTCPStr from );
            static XTPStr XTStrcat( XTPStr dest , XTCPStr src );

            static void XTMemcpy( void* to , const void* from , XTUint32 size );
            static void* XTMemset( void* s , XTInt32 c , XTUint32 size );

            static void* XTMalloc( XTUint32 size );

            static void XTFree( void* addr );
			static void XTExit(XTInt32 status);

			static XTInt32 XTSigfillset(sigset_t *sig_set);
			static XTInt32 XTSigemptyset(sigset_t *sig_set);
			static XTInt32 XTSigpending(sigset_t *sig_set);
			static XTInt32 XTSigprocmask(XTInt32 how, const sigset_t *sig_set,sigset_t *sig_oldset);

    };
}

#endif
